package static_demo.学生工具类;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        // 创建集合添加对象
        ArrayList<Student> list=new ArrayList<>();

        Student s1=new Student("zhangsan",20,'男');
        Student s2=new Student("lisi",20,'男');
        Student s3=new Student("wangwu",21,'男');

        list.add(s1);
        list.add(s2);
        list.add(s3);

        // 定义工具类返回最大的年龄
        int maxAge=StudentUitl.getMaxAge(list);
        System.out.println(maxAge);
    }




}
